{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'/root/Diff-Anomaly/TranAD/data'"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%pwd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "smd_dir = '../processed/SMD/'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "84\n",
      "(28479, 38)\n",
      "normalized: machine-1-1_test.npy 0.0 - 1.0\n",
      "(23703, 38)\n",
      "normalized: machine-3-2_labels.npy 0.0 - 1.0\n",
      "(28743, 38)\n",
      "normalized: machine-2-6_train.npy 0.0 - 1.0\n",
      "(23693, 38)\n",
      "normalized: machine-3-10_test.npy 0.0 - 1.0\n",
      "(23700, 38)\n",
      "normalized: machine-2-2_labels.npy 0.0 - 1.0\n",
      "(23689, 38)\n",
      "normalized: machine-1-6_labels.npy 0.0 - 1.0\n",
      "(23694, 38)\n",
      "normalized: machine-1-2_test.npy 0.0 - 1.0\n",
      "(23696, 38)\n",
      "normalized: machine-2-7_test.npy 0.0 - 1.0\n",
      "(28479, 38)\n",
      "normalized: machine-1-1_train.npy 0.0 - 1.0\n",
      "(23702, 38)\n",
      "normalized: machine-1-3_train.npy 0.0 - 1.0\n",
      "(28696, 38)\n",
      "normalized: machine-3-11_test.npy 0.0 - 1.0\n",
      "(28700, 38)\n",
      "normalized: machine-3-1_labels.npy 0.0 - 1.0\n",
      "(28705, 38)\n",
      "normalized: machine-3-7_test.npy 0.0 - 1.0\n",
      "(28713, 38)\n",
      "normalized: machine-3-9_test.npy 0.0 - 1.0\n",
      "(28695, 38)\n",
      "normalized: machine-3-11_train.npy 0.0 - 1.0\n",
      "(23688, 38)\n",
      "normalized: machine-2-3_train.npy 0.0 - 1.0\n",
      "(23689, 38)\n",
      "normalized: machine-2-4_labels.npy 0.0 - 1.0\n",
      "(23699, 38)\n",
      "normalized: machine-1-8_test.npy 0.0 - 1.0\n",
      "(23694, 38)\n",
      "normalized: machine-2-1_labels.npy 0.0 - 1.0\n",
      "(23706, 38)\n",
      "normalized: machine-1-4_train.npy 0.0 - 1.0\n",
      "(23702, 38)\n",
      "normalized: machine-3-2_train.npy 0.0 - 1.0\n",
      "(23694, 38)\n",
      "normalized: machine-1-2_train.npy 0.0 - 1.0\n",
      "(28705, 38)\n",
      "normalized: machine-3-7_train.npy 0.0 - 1.0\n",
      "(23703, 38)\n",
      "normalized: machine-3-3_test.npy 0.0 - 1.0\n",
      "(23707, 38)\n",
      "normalized: machine-1-4_labels.npy 0.0 - 1.0\n",
      "(28743, 38)\n",
      "normalized: machine-2-6_test.npy 0.0 - 1.0\n",
      "(28479, 38)\n",
      "normalized: machine-1-1_labels.npy 0.0 - 1.0\n",
      "(23699, 38)\n",
      "normalized: machine-2-2_train.npy 0.0 - 1.0\n",
      "(28704, 38)\n",
      "normalized: machine-3-8_test.npy 0.0 - 1.0\n",
      "(23689, 38)\n",
      "normalized: machine-1-6_test.npy 0.0 - 1.0\n",
      "(23698, 38)\n",
      "normalized: machine-1-8_train.npy 0.0 - 1.0\n",
      "(28722, 38)\n",
      "normalized: machine-2-9_labels.npy 0.0 - 1.0\n",
      "(23699, 38)\n",
      "normalized: machine-1-8_labels.npy 0.0 - 1.0\n",
      "(23706, 38)\n",
      "normalized: machine-1-5_labels.npy 0.0 - 1.0\n",
      "(23687, 38)\n",
      "normalized: machine-3-4_train.npy 0.0 - 1.0\n",
      "(23689, 38)\n",
      "normalized: machine-2-5_labels.npy 0.0 - 1.0\n",
      "(28726, 38)\n",
      "normalized: machine-3-6_labels.npy 0.0 - 1.0\n",
      "(23693, 38)\n",
      "normalized: machine-3-10_labels.npy 0.0 - 1.0\n",
      "(23697, 38)\n",
      "normalized: machine-1-7_train.npy 0.0 - 1.0\n",
      "(23690, 38)\n",
      "normalized: machine-3-5_train.npy 0.0 - 1.0\n",
      "(23694, 38)\n",
      "normalized: machine-2-1_test.npy 0.0 - 1.0\n",
      "(23703, 38)\n",
      "normalized: machine-2-8_test.npy 0.0 - 1.0\n",
      "(23689, 38)\n",
      "normalized: machine-2-3_labels.npy 0.0 - 1.0\n",
      "(23689, 38)\n",
      "normalized: machine-2-3_test.npy 0.0 - 1.0\n",
      "(23691, 38)\n",
      "normalized: machine-3-5_labels.npy 0.0 - 1.0\n",
      "(23689, 38)\n",
      "normalized: machine-2-5_test.npy 0.0 - 1.0\n",
      "(23687, 38)\n",
      "normalized: machine-3-4_labels.npy 0.0 - 1.0\n",
      "(23703, 38)\n",
      "normalized: machine-2-8_labels.npy 0.0 - 1.0\n",
      "(23706, 38)\n",
      "normalized: machine-1-5_test.npy 0.0 - 1.0\n",
      "(23692, 38)\n",
      "normalized: machine-3-10_train.npy 0.0 - 1.0\n",
      "(23697, 38)\n",
      "normalized: machine-1-7_labels.npy 0.0 - 1.0\n",
      "(28704, 38)\n",
      "normalized: machine-3-8_labels.npy 0.0 - 1.0\n",
      "(23700, 38)\n",
      "normalized: machine-2-2_test.npy 0.0 - 1.0\n",
      "(28700, 38)\n",
      "normalized: machine-3-1_test.npy 0.0 - 1.0\n",
      "(28705, 38)\n",
      "normalized: machine-3-7_labels.npy 0.0 - 1.0\n",
      "(28722, 38)\n",
      "normalized: machine-2-9_test.npy 0.0 - 1.0\n",
      "(28726, 38)\n",
      "normalized: machine-3-6_train.npy 0.0 - 1.0\n",
      "(23688, 38)\n",
      "normalized: machine-1-6_train.npy 0.0 - 1.0\n",
      "(23696, 38)\n",
      "normalized: machine-2-7_labels.npy 0.0 - 1.0\n",
      "(23703, 38)\n",
      "normalized: machine-3-3_labels.npy 0.0 - 1.0\n",
      "(23689, 38)\n",
      "normalized: machine-2-4_train.npy 0.0 - 1.0\n",
      "(23694, 38)\n",
      "normalized: machine-1-2_labels.npy 0.0 - 1.0\n",
      "(23705, 38)\n",
      "normalized: machine-1-5_train.npy 0.0 - 1.0\n",
      "(23689, 38)\n",
      "normalized: machine-2-4_test.npy 0.0 - 1.0\n",
      "(23703, 38)\n",
      "normalized: machine-1-3_test.npy 0.0 - 1.0\n",
      "(23687, 38)\n",
      "normalized: machine-3-4_test.npy 0.0 - 1.0\n",
      "(23693, 38)\n",
      "normalized: machine-2-1_train.npy 0.0 - 1.0\n",
      "(23707, 38)\n",
      "normalized: machine-1-4_test.npy 0.0 - 1.0\n",
      "(28713, 38)\n",
      "normalized: machine-3-9_train.npy 0.0 - 1.0\n",
      "(23696, 38)\n",
      "normalized: machine-2-7_train.npy 0.0 - 1.0\n",
      "(23703, 38)\n",
      "normalized: machine-3-2_test.npy 0.0 - 1.0\n",
      "(23691, 38)\n",
      "normalized: machine-3-5_test.npy 0.0 - 1.0\n",
      "(28703, 38)\n",
      "normalized: machine-3-8_train.npy 0.0 - 1.0\n",
      "(28713, 38)\n",
      "normalized: machine-3-9_labels.npy 0.0 - 1.0\n",
      "(23702, 38)\n",
      "normalized: machine-2-8_train.npy 0.0 - 1.0\n",
      "(28726, 38)\n",
      "normalized: machine-3-6_test.npy 0.0 - 1.0\n",
      "(23697, 38)\n",
      "normalized: machine-1-7_test.npy 0.0 - 1.0\n",
      "(28700, 38)\n",
      "normalized: machine-3-1_train.npy 0.0 - 1.0\n",
      "(23703, 38)\n",
      "normalized: machine-1-3_labels.npy 0.0 - 1.0\n",
      "(28722, 38)\n",
      "normalized: machine-2-9_train.npy 0.0 - 1.0\n",
      "(28696, 38)\n",
      "normalized: machine-3-11_labels.npy 0.0 - 1.0\n",
      "(23688, 38)\n",
      "normalized: machine-2-5_train.npy 0.0 - 1.0\n",
      "(23703, 38)\n",
      "normalized: machine-3-3_train.npy 0.0 - 1.0\n",
      "(28743, 38)\n",
      "normalized: machine-2-6_labels.npy 0.0 - 1.0\n"
     ]
    }
   ],
   "source": [
    "files = os.listdir(smd_dir)\n",
    "print(len(files))\n",
    "for file in files:\n",
    "    sample = np.load(smd_dir + file)\n",
    "    max = sample.max()\n",
    "    min = sample.min()\n",
    "    print(sample.shape)\n",
    "    if min == 0 and max == 1:\n",
    "        print(f'normalized: {file} {min} - {max}')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "py3.9test",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "27efe6010b91a164a18a011cd71b7afbe2f076e5b83b7f8099f414d97e11e710"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
